package com.mixsmart.spellsql.where;

import com.mixsmart.spellsql.IWhere;

/**
 * AndWrap实现类
 * @author lmq
 * @version 1.0
 * @since 1.0
 */
public class AndWrapWhere extends CompositeWhere {

	private IWhere where1;
	
	private IWhere where2;
	
	public AndWrapWhere(IWhere where1,IWhere where2) {
		this.where1 = where1;
		this.where2 = where2;
	}
	
	@SuppressWarnings("unchecked")
	@Override
	public String build() {	
		String conditionStr = where1.build()+" and "+where1.build();
		super.getParam(where2, where1);
		return conditionStr;
	}
	
}
